<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>模拟斗地主发牌</title>
</head>
<body>
  <script>
    let brand = [
      '红桃A', '红桃2', '红桃3', '红桃4', '红桃5', '红桃6', '红桃7', '红桃8', '红桃9', '红桃10', '红桃J', '红桃K', '红桃K',
      '方片A', '方片2', '方片3', '方片4', '方片5', '方片6', '方片7', '方片8', '方片9', '方片10', '方片J', '方片Q', '方片K',
      '黑桃A', '黑桃2', '黑桃3', '黑桃4', '黑桃5', '黑桃6', '黑桃7', '黑桃8', '黑桃9', '黑桃10', '黑桃J', '黑桃Q', '黑桃K',
      '梅花A', '梅花2', '梅花3', '梅花4', '梅花5', '梅花6', '梅花7', '梅花8', '梅花9', '梅花10', '梅花J', '梅花Q', '梅花K',
      '大王', '小王'
    ]
    for (let i = brand.length - 1; i > 0; i--) {
      let res = Math.floor(Math.random() * (i + 1))
      [brand[i], brand[res]] = [brand[res], brand[i]]
    }
    let Nomin1 = brand.slice(0, 17) // 农民1的牌
    let Nomin2 = brand.slice(17, 34)
    let Nomin3 = brand.slice(34, 51)
    let san = brand.slice(51, 54)
    console.log('农民1： ' + Nomin1)
    console.log('农民2： ' + Nomin2)
    console.log('农民3： ' + Nomin3)
    console.log('三张底牌： ' + san)
  </script>
</body>
</html>